package com.qf.game;

public class IceBall extends Magic{
    private int count;

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }
    @Override
    public int dealmagicDamage() {
        if(count == 10){
            int currentGrade = getGrade();
            setGrade(currentGrade+1);
            System.out.println("技能升级，当前技能等级"+getGrade());
            count = 0;
        }
        int magicDamage = getMagicDamage();
        int totalDamage = magicDamage * getGrade();
        count++;
        return totalDamage;
    }
}
